import request from '@/utils/request'

export default {

	//讲师列表(条件查询 分页)
	getPageExample(current,size,teacherQuery) {
		return request({
			url: `/edu/teacher/getPageExample?current=${current}&size=${size}`,
			method: 'post',
			//后端使用requestBody接收数据
			data:teacherQuery
		})
	},
	//根据id删除
	deleteById(id){
		return request({
			url: `/edu/teacher/${id}`,
			method: 'delete'
		})
	},
	//添加讲师
	add(teacher){
		return request({
			url: `/edu/teacher/add`,
			method: 'post',
			data:teacher
		})
	},
	getById(id){
		return request({
			url: `/edu/teacher/${id}`,
			method: 'get'
		})
	},
	update(teacher){
		return request({
			url: `/edu/teacher/update`,
			method: 'post',
			data:teacher
		})
	}

}